package com.jule.teenpatti.mail;

import com.jule.core.utils.xml.LogConfigUtils;
import com.jule.teenpatti.mail.config.Config;
import com.jule.teenpatti.mail.network.IOServer;
import com.jule.teenpatti.mail.service.MailConfigService;
import com.jule.teenpatti.mail.service.MailService;
import com.jule.teenpatti.mail.service.MailSub;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public class Main {
    public static void main(String[] args) {
        try {
            LogConfigUtils.initLogConfig();
            Config.load();
            IOServer.connect();

            //加载配置信息
            MailConfigService.getInstance().initConfig();
            //加载玩家邮件信息
            MailService.getInstance().init();

            //处理桌子订阅
            MailSub sub = new MailSub();
            sub.start();

        } catch (Exception e) {
            log.error(e.getMessage(),e);
        } finally {

        }
    }
}
